﻿#ifndef TILESERVICE_H
#define TILESERVICE_H
#include <QString>
#include "TileOption.h"
#include <QStringList>
#include <QThread>
#include "datasource.h"

using namespace rxtiler;

class TileServiceOption
{
public:
    enum TaskType{
        Invalid,
        DEM,
        IMG
    };
    enum TileType{
        DEM_TERRAIN,
        DEM_BIL,
        IMG_DEF
    };

    TileServiceOption();

    TaskType taskType;
    QStringList inputFiles;
    QString outDir;
    TileOption tileOption;
    int level0;
    int level1;
    TileType tileType;
    //.png
    QString ext;
    //ispak
    bool ispak;
    //
    QString latlan;
};

class TileService : public QThread
{
public:
    TileService();

    int handle(TileServiceOption& option);
protected:
    TileServiceOption _option;
    DataSource* _insource{0};
    DataSource* _outsource{0};

    // QThread interface
protected:
    void run();
};

#endif // TILESERVICE_H
